  function createHttpRequest(){
    if(window.ActiveXObject){
        try {
            return new ActiveXObject("Msxml2.XMLHTTP")
        } catch (e) {
            try {
                return new ActiveXObject("Microsoft.XMLHTTP")
            } catch (e2) {
                return null
            }
         }
    } else if(window.XMLHttpRequest){
        return new XMLHttpRequest()
    } else {
        return null
    }
  }

  function requestFile( data , method , fileName , async , callback )
  {
    var httpoj = createHttpRequest()
    httpoj.open( method , fileName , async )
    httpoj.onreadystatechange = function()
    { 
      if (httpoj.readyState==4)
      {
        if (callback != null) {
          callback(httpoj);
        }
      }
    }
    httpoj.send( data )
  }

